package com.cn.test1.service;

import com.cn.test1.data.BuildData;
import com.cn.test1.model.BuildModel;

import java.util.ArrayList;
import java.util.List;

public class BuildService {
    public List<BuildModel> getBuildImgs() {
        List<BuildModel> list = new ArrayList<>();
        BuildData buildData = new BuildData();
        for (int i = 0; i < buildData.buildImgs.length; i++) {
            BuildModel buildModel = new BuildModel();
            buildModel.setBuildImgs(buildData.buildImgs[i]);
            buildModel.setBuildNames(buildData.buildNames[i]);
            list.add(buildModel);
        }
        return list;
    }

    public List<BuildModel> getbuildDescriptions() {
        List<BuildModel> list = new ArrayList<>();
        BuildData buildData = new BuildData();
        for (int i = 0; i < buildData.buildDescription1.length; i++) {
            BuildModel buildModel = new BuildModel();
            buildModel.setBuildDescription1(buildData.buildDescription1[i]);
            buildModel.setBuildDescription2(buildData.buildDescription2[i]);
            buildModel.setBuildDescription3(buildData.buildDescription3[i]);
            buildModel.setBuildDescription4(buildData.buildDescription4[i]);
            buildModel.setBuildDescription5(buildData.buildDescription5[i]);
            buildModel.setBuildDescription6(buildData.buildDescription6[i]);
            list.add(buildModel);
        }
        return list;
    }

    public List<BuildModel> getbuildNav() { //导航条
        List<BuildModel> list = new ArrayList<>();
        BuildData buildData = new BuildData();
        for (int i = 0; i < buildData.nav.length; i++) {
            BuildModel buildModel = new BuildModel();
            buildModel.setNav(buildData.nav[i]);
            list.add(buildModel);
        }
        return list;

    }
}
